package io.renren.modules.app.entity;

import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import io.renren.common.utils.SnowflakeIdWorker;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;


import java.math.BigDecimal;
import java.io.Serializable;
import java.time.Instant;
import java.util.Date;
import lombok.Data;

/**
 * 订单表
 * 
 * @author MR.XU
 * @email 260139486@qq.com
 * @date 2021-01-19 10:04:49
 */
@Data
@TableName("tb_order")
@ApiModel(value = "Order对象", description = "订单表")
public class OrderEntity implements Serializable {
	private static final long serialVersionUID = 1L;

	/**
	 * ID
	 */
	@TableId
		@ApiModelProperty(value = "ID",example = "1")
private Integer id;
	/**
	 * 订单号
	 */
		@ApiModelProperty(value = "订单号")
//private String orderNumber = SnowflakeIdWorker.uniqueSequenceStr();
private String orderNumber = SnowflakeIdWorker.getNextOrderNo("SPDD");
	/**
	 * 用户id
	 */
		@ApiModelProperty(value = "用户id",example = "1")
private Integer userId;
	/**
	 * 总价
	 */
		@ApiModelProperty(value = "总价")
private BigDecimal totalPrice;
	/**
	 * 订单详情
	 */
		@ApiModelProperty(value = "订单详情")
private String details;
	/**
	 * 下单时间
	 */
		@ApiModelProperty(value = "下单时间")
private Date createTime = Date.from(Instant.now());;
	/**
	 * 0取消，1待付款，2已付款,3已发货,4 已完成，5已评价
	 */
		@ApiModelProperty(value = "0取消，1待付款，2已付款,3已发货,4 已完成，5已评价",example = "1")
private Integer status;
	/**
	 * 手机号
	 */
		@ApiModelProperty(value = "手机号")
private String mobile;
	/**
	 * 支付时间
	 */
		@ApiModelProperty(value = "支付时间")
private Date payTime;
	/**
	 * 总商品数
	 */
		@ApiModelProperty(value = "总商品数",example = "1")
private Integer totalNum;
	/**
	 * 退款时间
	 */
		@ApiModelProperty(value = "退款时间")
private Date refundTime;
	/**
	 * 1微信支付，2支付宝支付，3qq支付
	 */
		@ApiModelProperty(value = "1微信支付，2支付宝支付，3qq支付",example = "1")
private Integer payType;
	/**
	 * 1退款申请成功，0，退款申请失败
	 */
		@ApiModelProperty(value = "1退款申请成功，0，退款申请失败",example = "1")
private Integer refundType;
	/**
	 * 备注
	 */
		@ApiModelProperty(value = "备注")
private String remark;
	/**
	 * 运费
	 */
		@ApiModelProperty(value = "运费")
private BigDecimal freight;
	/**
	 * 收货人
	 */
		@ApiModelProperty(value = "收货人")
private String receiver;
	/**
	 * 收货地址
	 */
		@ApiModelProperty(value = "收货地址")
private String address;
	/**
	 * 物流编号
	 */
		@ApiModelProperty(value = "物流编号")
private String logisticsNum;
	/**
	 * 物流方式
	 */
		@ApiModelProperty(value = "物流方式")
private String logisticsType;
	/**
	 * 0 到店自取 1快递
	 */
		@ApiModelProperty(value = "0 到店自取 1快递",example = "1")
private Integer sendstyle;
	/**
	 * 0：未删除1：已删除
	 */
		@ApiModelProperty(value = "0：未删除1：已删除",example = "1")
private Integer isDel;

}
